package com.aatattoo.light_food_service.service;

import com.aatattoo.light_food_service.entity.Like;
import com.aatattoo.light_food_service.mapper.LikeMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author aatattoo
 * @Date 2021/12/16 12:57 下午
 * @msg:
 */
@Service
@Component
public class LikeService {
    @Autowired
    private LikeMapper likeMapper;

    public int addLike(Like like){
        System.out.println(like);
        return likeMapper.addLike(like);
    }

    public int deleteLike(Like like){
        return likeMapper.deleteLike(like);
    }

    public int checkLike(Like like){
        return likeMapper.checkLike(like);
    }

    public int countLike(Like like){
        return likeMapper.countLike(like);
    }

    public int countRemind(Like like){
        return likeMapper.countRemind(like);
    }

    public List<Like> findByParentId(Like like){
        return likeMapper.findByParentId(like);
    }

    public int updateRemind(Like like){
        return likeMapper.updateRemind(like);
    }
}
